-
Notifications
You must be signed in to change notification settings - Fork 163
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Copy tenant with Short URL #1804
Copy tenant with Short URL #1804
Conversation
Signed-off-by: Craig Perkins <[email protected]>
Blocked on: #1783, since github actions were moved out of security repo |
@cwperks can you run |
Will add this linting as a precommit hook as a part of this issue for the future: #1805 |
Signed-off-by: Craig Perkins <[email protected]>
…ks/security-dashboards-plugin into copy-short-url-with-tenant
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1804 +/- ##
==========================================
- Coverage 67.41% 67.38% -0.03%
==========================================
Files 94 94
Lines 2409 2410 +1
Branches 321 320 -1
==========================================
Hits 1624 1624
- Misses 707 708 +1
Partials 78 78 ☔ View full report in Codecov by Sentry. |
Opened PR in FTR repo that contains tests for this: opensearch-project/opensearch-dashboards-functional-test#1128 |
Signed-off-by: Craig Perkins <[email protected]>
Install Dashboards with Plugin via Binary is failing with:
|
I was seeing this too across a few repos I added the workflow for. It's coming from core I think. I created an issue: opensearch-project/OpenSearch-Dashboards#5952. This workflow is also a good way to catch issues in core 😉 |
Signed-off-by: Craig Perkins <[email protected]>
…ks/security-dashboards-plugin into copy-short-url-with-tenant
Signed-off-by: Craig Perkins <[email protected]>
Signed-off-by: Craig Perkins <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes look good to me. Thank you for fixing this bug @cwperks !
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes look good, going to check out your branch and verify it works as expected
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For some reason safari is dropping the tenant from the share button, can you take a look?
Signed-off-by: Craig Perkins <[email protected]>
@derek-ho Pushed a fix. Safari was having an issue with creating a new range instead of replacing the existing range. I pushed a change to get the range if it exists, modify it and add it back. |
Signed-off-by: Craig Perkins <[email protected]>
@derek-ho I pushed one more small change. I noticed after more testing that since fixing the bug on short url, it was finally hitting the block where it would replace the text content and it was not correctly assembling the new url with the protocol and hash as well. The last commit fixes that to assemble the full url and add the |
Signed-off-by: Craig Perkins <[email protected]>
Signed-off-by: Craig Perkins <[email protected]>
@peternied Sorry for one more push, but I found a way to really simplify the logic with adding the security_tenant as a url param. Instead of re-assembling the url from its constituent components I instead use the URL class from javascript and directly parse the URL string and append a searchParam if its not already there. This also adds a test for the iFrame logic because the copy link with an iFrame should return an iFrame with an updated |
Signed-off-by: Craig Perkins <[email protected]> Signed-off-by: Craig Perkins <[email protected]> (cherry picked from commit c80b64a)
Signed-off-by: Craig Perkins <[email protected]> Signed-off-by: Craig Perkins <[email protected]> (cherry picked from commit c80b64a) Co-authored-by: Craig Perkins <[email protected]>
Description
This PR fixes the bug described in #1769 where copying the short url is not including tenant information as a url param.
Category
Bug fix
Issues Resolved
Testing
Check List
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.